package com.navi.loaddata.core.oracleEntity.cell2;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * Created by ghost on 2018/5/16.
 */
public class Cell2DefectOldTPK implements Serializable {
    private long recordIndex;
    private String defectSeqNo;

    @Column(name = "RECORD_INDEX")
    @Id
    public long getRecordIndex() {
        return recordIndex;
    }

    public void setRecordIndex(long recordIndex) {
        this.recordIndex = recordIndex;
    }

    @Column(name = "DEFECT_SEQ_NO")
    @Id
    public String getDefectSeqNo() {
        return defectSeqNo;
    }

    public void setDefectSeqNo(String defectSeqNo) {
        this.defectSeqNo = defectSeqNo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Cell2DefectOldTPK that = (Cell2DefectOldTPK) o;

        if (recordIndex != that.recordIndex) return false;
        if (defectSeqNo != null ? !defectSeqNo.equals(that.defectSeqNo) : that.defectSeqNo != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (recordIndex ^ (recordIndex >>> 32));
        result = 31 * result + (defectSeqNo != null ? defectSeqNo.hashCode() : 0);
        return result;
    }
}
